package me.cxlr.qinlauncher2.view.launcher;

import android.view.View;
import android.widget.TextClock;

import me.cxlr.qinlauncher2.util.SharedPreferencesUtil;

/**
 * @author 酷安用户:山轮纸
 */
public class Desktop {
    private volatile static Desktop desktop;

    private Desktop() {
    }

    public static Desktop getInstance() {
        if (desktop == null) {
            synchronized (Desktop.class) {
                if (desktop == null) {
                    desktop = new Desktop();
                }
            }
        }
        return desktop;
    }

    public void loadClock(TextClock timeClock, TextClock dateClock) {
        int timeSize = Integer.parseInt(SharedPreferencesUtil.getInstance().getString("linshi_time_size", "52"));
        timeClock.setTextSize(timeSize);
        int dateSize = Integer.parseInt(SharedPreferencesUtil.getInstance().getString("linshi_date_size", "28"));
        dateClock.setTextSize(dateSize);
    }
}
